import {createStore} from 'vuex'
import getters from "./getters";
import mutations from "./mutations";
import actions from "./actions";
import user from "./user/user";

export default createStore({
    state: {
        num: 0,
        dnum: 0,
        cartlist: [
            {name: 'a', price: 10},
            {name: 'b', price: 20},
            {name: 'c', price: 30},
        ]
    },
    //计算属性
    getters,
    mutations,
    actions,
    modules: {
        user,
    }
})
